#ifndef _USRINFO_
#define _USRINFO_
#include "server.h"
#include "directory.h"
typedef struct usrnode_s {
    char usr_name[128];
    int netfd;
    char token[200];
    stackDir_t* dirStack;
    struct usrnode_s* pnext;
}usrnode_t;

typedef struct usrinfo_s {
    usrnode_t* head;
}usrinfo_t;

int usrinfoInit(usrinfo_t* usrinfo);

int usrinfoInsert(usrinfo_t* usrinfo,char* usr_name,int netfd);

int usrinfodel(usrinfo_t* usrinfo,int netfd);

int delusrinfo(usrinfo_t* usrinfo);

int netfd_to_usrname(usrinfo_t* usrinfo,int netfd,char* usrname);

int inserttoken(usrinfo_t* usrinfo,int netfd,char* token);

stackDir_t* netfd_to_dirStack(usrinfo_t* usrinfo,int netfd);

stackDir_t* usrname_to_dirStack(usrinfo_t* usrinfo,char* usrname);
#endif
